home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / stk-3.002 / stk-3 / STk-3.1 / Makefile.in < prev    next >
Encoding:
Makefile  |  1996-07-24  |  5.9 KB  |  189 lines

  1. #
  2. # Toplevel Makefile for STk
  3. #
  4. # Copyright ⌐ 1993-1996 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
  5. # Permission to use, copy, and/or distribute this software and its
  6. # documentation for any purpose and without fee is hereby granted, provided
  7. # that both the above copyright notice and this permission notice appear in
  8. # all copies and derived works.  Fees for distribution or use of this
  9. # software or derived works may only be charged with express written
  10. # permission of the copyright holder.  
  11. # This software is provided ``as is'' without express or implied warranty.
  12. #
  13. #           Author: Erick Gallesio [eg@unice.fr]
  14. #    Creation date: ??-Sep-1993 ??:??
  15. # Last file update: 24-Jul-1996 21:53
  16. #
  17.  
  18.  
  19. include VERSION
  20.  
  21. SHELL        = /bin/sh
  22. CP        = /bin/cp
  23. RANLIB         = @RANLIB@
  24. MACHINE        = @MACHINE@
  25. MP        = @MP@.a
  26. FLAVOR        = unix
  27.  
  28. prefix         = @prefix@
  29. stkdir        = $(prefix)/lib/stk
  30. libdir         = $(stkdir)/$(VERSION)
  31. execdir     = $(libdir)/$(MACHINE)
  32. mandir         = $(libdir)/man
  33. incdir        = $(libdir)/include
  34. bindir         = $(prefix)/bin
  35. etcdir        = $(prefix)/etc
  36.  
  37. all: start tcl tk mp src snow stklos ext stop 
  38.     
  39. start:
  40.     @date > .start-date
  41.     @/bin/rm -f config.make
  42.     @echo "# Common startup for all Makefiles"        >  config.make
  43.     @echo "VERSION        = $(VERSION)"            >> config.make
  44.     @echo "FLAVOR        = $(FLAVOR)"            >> config.make
  45.     @echo "SHELL        = $(SHELL)"            >> config.make
  46.     @echo "prefix        = $(prefix)"            >> config.make
  47.     @echo "stkdir        = $(stkdir)"            >> config.make
  48.     @echo "libdir         = $(libdir)"            >> config.make
  49.     @echo "execdir         = $(execdir)"            >> config.make
  50.     @echo "incdir         = $(incdir)"            >> config.make
  51.     @echo "bindir         = $(bindir)"            >> config.make
  52.     @echo "mandir         = $(mandir)"            >> config.make
  53.     @echo "etcdir         = $(etcdir)"            >> config.make
  54.     @echo "VERS-OPT        = -DSTK_VERSION=\\\"$(VERSION)\\\"">> config.make
  55.     @echo "MACHINE         = -DMACHINE=\\\"$(MACHINE)\\\""    >> config.make
  56.     @echo "CC        = @CC@"                >> config.make
  57.     @echo "STKCFLAGS    = @STKCFLAGS@"            >> config.make
  58.     @echo "STKLDFLAGS    = @STKLDFLAGS@"            >> config.make
  59.     @echo "CP        = $(CP)"            >> config.make
  60.     @echo "RANLIB        = @RANLIB@"            >> config.make
  61.     @echo "STRIP        = @STRIP@"            >> config.make
  62.     @echo "XINCLUDES    = @XINCLUDES@"            >> config.make
  63.     @echo "XLIBSW        = @XLIBSW@"            >> config.make
  64.     @echo "MP        = @MP@"                >> config.make
  65.     @echo "DFLGS        = @DFLGS@"            >> config.make
  66.     @echo "EOBJ        = @EOBJ@"            >> config.make
  67.     @echo "ETKOBJ        = @ETKOBJ@"            >> config.make
  68.     @echo "EXTRA_OBJ    = @EXTRA_OBJ@"            >> config.make
  69.     @echo "DYNLOAD        = @DYNLOAD@"            >> config.make
  70.     @echo "SH_CCFLAGS    = @SH_CCFLAGS@"            >> config.make
  71.     @echo "SH_LDFLAGS    = @SH_LDFLAGS@"            >> config.make
  72.     @echo "SH_LOADER    = @SH_LOADER@"            >> config.make
  73.     @echo "SH_SUFFIX    = @SH_SUFFIX@"            >> config.make
  74.     @echo "LIB_MALLOC    = @LIB_MALLOC@"            >> config.make
  75.     @echo "LIB_DLD        = @LIB_DLD@"            >> config.make
  76.         
  77.     @echo "STK_LIBRARY    = $(libdir)"            >> config.make
  78.  
  79.  
  80. stop:
  81.     @echo -n "Make started at "
  82.     @cat .start-date
  83.     @/bin/rm .start-date
  84.     @echo -n "Make completed at "
  85.     @date
  86.  
  87. tcl:
  88.     @(echo "make Tcl"; cd Tcl; $(MAKE) all)
  89. tk:
  90.     @(echo "make Tk"; cd Tk; $(MAKE) libtk.a)
  91. mp:
  92.     @(echo "make Mp"; cd Mp; $(MAKE) $(MP))
  93. src:
  94.     @(echo "make Src"; cd Src; $(MAKE) stk TK="-DUSE_TK")
  95. snow:
  96.     @(echo "make Snow"; cd Snow; $(MAKE) snow TK="-DNO_TK")
  97. stklos:
  98.     @(echo "make STklos"; cd STklos; $(MAKE) stklos)    
  99. ext:
  100.     @(echo "Make Extensions"; cd Extensions; $(MAKE) all)
  101. doc:
  102.     @(echo "Make Documentation"; cd Doc; $(MAKE) all)
  103. dvi:
  104.     @(echo "Make Documentation(dvi)"; cd Doc; $(MAKE) dvi)
  105.  
  106. demos:
  107.     /bin/sh -c "(cd Demos; ../Src/test-stk -f hbrowse README.html)"
  108.  
  109. install: clean-before
  110.     (cd Tcl;         $(MAKE) install)
  111.     (cd Tk;          $(MAKE) install)
  112.     (cd Mp;        $(MAKE) install)
  113.     (cd Src;         $(MAKE) install.stk)
  114.     (cd Snow;         $(MAKE) install.snow)
  115.     (cd Lib;         $(MAKE) install)
  116.     (cd STklos;      $(MAKE) install)
  117.     (cd Extensions; $(MAKE) install)
  118.     (cd Demos;       $(MAKE) install)
  119.     (cd Help;    $(MAKE) install)
  120.     @echo ""
  121.     @echo "Installation completed."
  122.  
  123. install.libs:
  124.     (cd Tcl;         $(MAKE) install.libs)
  125.     (cd Tk;          $(MAKE) install.libs)
  126.     (cd Mp;        $(MAKE) install.libs)
  127.     (cd Src;         $(MAKE) install.stk.libs)
  128.     (cd Snow;         $(MAKE) install.snow.libs)
  129.     -if [ ! -d $(etcdir) ] ; then mkdir -p $(etcdir); fi
  130.     $(CP) config.make $(etcdir)
  131.     @echo ""
  132.     @echo "Full installation completed."
  133.  
  134. binary-release: install install.man
  135.     (cd $(prefix)/lib; \
  136.      tar cvfz /tmp//STk-$(VERSION)-$(MACHINE).tar.gz stk/$(VERSION)/$(MACHINE))
  137.     @echo "The release is in the file  /tmp/STk-$(VERSION)-$(MACHINE).tar.gz"
  138.     @echo "Don't forget to create the file STk-$(VERSION)-$(MACHINE).README"
  139.     @echo "to describe the content of your archive (a template is given in"
  140.     @echo "the file BINARY-DISTRIB"
  141.  
  142. common-release: 
  143.     (cd $(prefix)/lib; \
  144.      tar cvfz /tmp/STk-$(VERSION)-common.tar.gz stk/$(VERSION)/Help   \
  145.                             stk/$(VERSION)/STk    \
  146.                             stk/$(VERSION)/demos  \
  147.                             stk/$(VERSION)/images \
  148.                             stk/$(VERSION)/images \
  149.                             stk/$(VERSION)/man    \
  150.                             stk/man)
  151.     @echo "TerminΘ. Le fichier est dans /tmp/STk-$(VERSION)-common.tar.gz"
  152.  
  153. clean-before:
  154.     @if [ -d $(prefix)/lib/stk ]; \
  155.     then \
  156.       echo "*** WARNING:"; \
  157.       echo "*** A previous version of STk has already been installed in"; \
  158.       echo "*** directory '$(stkdir). It is not a problem since"; \
  159.       echo "*** several versions can coexist now in this directory"; \
  160.       echo "*** However, if you are short in place, or if you don't use "; \
  161.       echo "*** a multi architecture file system, cleaning may be a good"; \
  162.       echo "*** thing to do."; \
  163.       echo "***" ; \
  164.       echo "*** Should I clean this directory before starting installation"; \
  165.        echo -n "*** of STk-$(VERSION) file? [no] " ; \
  166.       read a; \
  167.       case $$a in \
  168.         y*|Y*) /bin/rm -rf $(stkdir)/[0-9]*;; \
  169.         *) echo "No cleaning!";;  \
  170.       esac; \
  171.     fi
  172.      
  173. install.man:
  174.     (cd Doc;    $(MAKE) install.man)
  175.  
  176. clean:
  177.     (cd Tcl;        $(MAKE) clean)
  178.     (cd Tk;         $(MAKE) clean)
  179.     (cd Mp;         $(MAKE) clean)
  180.     (cd Src;        $(MAKE) clean)
  181.     (cd Snow;        $(MAKE) clean)
  182.     (cd STklos;     $(MAKE) clean)
  183.     (cd Extensions; $(MAKE) clean)
  184.     (cd Help;    $(MAKE) clean)
  185.     (cd Doc;    $(MAKE) clean)
  186.     /bin/rm -f core *~ Makefile config.*
  187.